# SaveImage: 保存图片 ----
SaveImage <- function(plot = last_plot(),
                      path = "./",
                      image.name,
                      width = 8,
                      height = 6,
                      formats = c("png", "pdf"),
                      dpi = 600) {
  for (f in formats) {
    ggsave(file.path(path, paste0(image.name, ".", f)),
           plot = plot,
           device = f,
           width = width,
           height = height,
           dpi = dpi,
           limitsize = FALSE,
           create.dir = TRUE)
  }
}
